"""数据模型定义"""

from dataclasses import dataclass
from typing import List, Optional


@dataclass
class Column:
    """字段信息"""
    name: str
    type: str
    length: Optional[str] = None
    nullable: bool = True
    default: Optional[str] = None
    comment: Optional[str] = None


@dataclass
class Table:
    """表结构信息"""
    name: str
    columns: List[Column]
    comment: Optional[str] = None

